<!DOCTYPE html>
<html lang="en">

<!-- Head tag -->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="keyword"  content="">
    <link rel="shortcut icon" href="/img/ironman-draw.png">
    <!-- Place this tag in your head or just before your close body tag. -->
    <script async defer src="https://buttons.github.io/buttons.js"></script>
    <title>
        
          Mac 下使用 jenv 管理多个 JDK 版本 - 吃素的左撇子 | Blog
        
    </title>

    <link rel="canonical" href="http://www.wangxiaohuan.com/jenv/2019-01-14/">

    <!-- Bootstrap Core CSS -->
    
<link rel="stylesheet" href="/css/bootstrap.min.css">


    <!-- Custom CSS --> 
    
<link rel="stylesheet" href="/css/beantech.min.css">


    
<link rel="stylesheet" href="/css/donate.css">

    
    <!-- Pygments Highlight CSS -->
    
<link rel="stylesheet" href="/css/highlight.css">


    
<link rel="stylesheet" href="/css/widget.css">


    
<link rel="stylesheet" href="/css/rocket.css">


    
<link rel="stylesheet" href="/css/signature.css">


    
<link rel="stylesheet" href="/css/toc.css">


    <!-- Custom Fonts -->
    <!-- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
    <!-- Hux change font-awesome CDN to qiniu -->
    <link href="https://cdn.staticfile.org/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">


    <!-- Hux Delete, sad but pending in China
    <link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/
    css'>
    -->


    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- ga & ba script hoook -->
    <script></script>
<meta name="generator" content="Hexo 4.2.1"></head>


<!-- hack iOS CSS :active style -->
<body ontouchstart="">
	<!-- Modified by Yu-Hsuan Yen -->
<!-- Post Header -->
<style type="text/css">
    header.intro-header{
        
            background-image: url('http://image.wangxiaohuan.com/blog/image/202201271526441.png')
            /*post*/
        
    }
    
</style>

<header class="intro-header" >
    <!-- Signature -->
    <div id="signature">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                
                    <div class="post-heading">
                        <div class="tags">
                            
                              <a class="tag" href="/tags/#工具" title="工具">工具</a>
                            
                        </div>
                        <h1>Mac 下使用 jenv 管理多个 JDK 版本</h1>
                        <h2 class="subheading"></h2>
                        <span class="meta">
                            Posted by 吃素的左撇子 on
                            2019-01-14
                        </span>
                    </div>
                


                </div>
            </div>
        </div>
    </div>
</header>

	
    <!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header page-scroll">
            <button type="button" class="navbar-toggle">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">吃素的左撇子</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <!-- Known Issue, found by Hux:
            <nav>'s height woule be hold on by its content.
            so, when navbar scale out, the <nav> will cover tags.
            also mask any touch event of tags, unfortunately.
        -->
        <div id="huxblog_navbar">
            <div class="navbar-collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <a href="/">Home</a>
                    </li>

                    

                        
                    

                        
                        <li>
                            <a href="/about/">About Me</a>
                        </li>
                        
                    

                        
                        <li>
                            <a href="/archive/">Archive</a>
                        </li>
                        
                    

                        
                        <li>
                            <a href="/tags/">Tags</a>
                        </li>
                        
                    
                    
                </ul>
            </div>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container -->
</nav>
<script>
    // Drop Bootstarp low-performance Navbar
    // Use customize navbar with high-quality material design animation
    // in high-perf jank-free CSS3 implementation
    var $body   = document.body;
    var $toggle = document.querySelector('.navbar-toggle');
    var $navbar = document.querySelector('#huxblog_navbar');
    var $collapse = document.querySelector('.navbar-collapse');

    $toggle.addEventListener('click', handleMagic)
    function handleMagic(e){
        if ($navbar.className.indexOf('in') > 0) {
        // CLOSE
            $navbar.className = " ";
            // wait until animation end.
            setTimeout(function(){
                // prevent frequently toggle
                if($navbar.className.indexOf('in') < 0) {
                    $collapse.style.height = "0px"
                }
            },400)
        }else{
        // OPEN
            $collapse.style.height = "auto"
            $navbar.className += " in";
        }
    }
</script>


    <!-- Main Content -->
    <!-- Modify by Yu-Hsuan Yen -->

<!-- Post Content -->
<article>
    <div class="container">
        <div class="row">

            <!-- Post Container -->
            <div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                post-container">

                <h3 id="jdk-介绍">JDK 介绍</h3>
<p>JDK，全称：Java Development Kit，也就是<strong>Java开发人员发布的免费软件开发工具包</strong>。JDK一般包括JRE（Java Runtime Environment），所以我们需要使用Java环境，习惯性叫<strong>配置JDK环境</strong>。</p>
<p>一般，我们需要用到基于Java虚拟机的操作服务时，需要有JDK的环境，这样的Java有两个特点（<strong>Write once, run anywhere</strong>）：</p>
<ul>
<li>易于移植：只需要有Java的虚拟机（JDK）环境，即可运行Java程序。</li>
<li>需要平台有Java虚拟机支持：Java程序有所限制，需要有Java环境支持</li>
</ul>
<h3 id="jdk选择">JDK选择</h3>
<p>在配置JDK前，我们先来看看如何选择JDK。JDK的版本分支很多，大体上分为：</p>
<ul>
<li>OpenJDK：开源的JDK</li>
<li>OracleJDK：Oracle公司开发的JDK</li>
</ul>
<p>这个其实是看个人喜好，但是如果问我，<strong>我更推荐OpenJDK，避免项目因为版权问题而引发纠纷</strong>（每个程序员，都有个项目做大做强的梦……）</p>
<p>其中，软件包管理器的JDK，也属于OpenJDK的一种。</p>
<h3 id="openjdk">OpenJDK</h3>
<p>最开始，JDK由SUN公司开发，但是后来被Oracle公司收购，现在的OracleJDK，其License 协议已经从BCL换成了OTN，这就意味着，你不能在生产环境使用这个版本了（可能要被反薅了🥲）。</p>
<p>不过呢？早在2006 年的 Java One 大会上，Sun公司（那时候还没被Oracle收购）就宣布Java技术的开源，随之诞生了OpenJDK，并在随着Google的Android全面使用OpenJDK开始，OpenJDK使用的人数越来越多。</p>
<p>目前，OpenJDK 基本满足所有开发的需求和需要，小部分需要使用 OracleJDK 的包时，基本也可以通过引用外部包和自己编写依赖包解决（如：sun 包下的 Base64）。所以，目前使用 OpenJDK，<strong>不管作为开发还是生产环境，都是不错的选择。</strong></p>
<h3 id="jdk-版本选择">JDK 版本选择</h3>
<p>JD K的版本怎么选择呢？一般而言，<strong>JDK的版本并不是越高版本越好</strong>。JDK一般是一个稳定长期支持版本，然后经过两个快速开发版本迭代，再出一个稳定长期版本。比如：JDK8 发布，JDK9、JDK10 就是开发版本，之后的JDK11 又是一个稳定长期支持版本。</p>
<p>所以，<strong>通常情况下，我们使用稳定长期支持版本比较好，如：JDK8、JDK11、JDK17.</strong></p>
<p><strong><em>MAC 上安装了多个 JDK 版本，但是根据开发环境的需要如何在这些 JDK 版本之间切换呢？</em></strong></p>
<h4 id="这就需要使用-mac-上的-java-版本管理工具-jevn">这就需要使用 MAC 上的 JAVA 版本管理工具 <a href="https://www.jenv.be/" target="_blank" rel="noopener">jevn</a></h4>
<h3 id="jenv">Jenv</h3>
<p><a href="https://www.jenv.be/" target="_blank" rel="noopener">Jenv项目地址：https://www.jenv.be</a><br>
按照官网的解释:<br>
<em>jEnv is a command line tool to help you forget how to set the JAVA_HOME environment variable</em><br>
简单地说：<strong>使用一条命令可以轻松配置JAVA_HOME到环境变量。</strong></p>
<h3 id="安装-jenv">安装 Jenv</h3>
<p>Homebrew 是一款 Mac OS 平台下的软件包管理工具，拥有安装、卸载、更新、查看、搜索等很多实用的功能。简单的一条指令，就可以实现包管理，而不用你关心各种依赖和文件路径的情况，十分方便快捷。</p>
<p>在<a href="https://link.jianshu.com?t=https%3A%2F%2Fbrew.sh" target="_blank" rel="noopener">Homebrew</a>官网上有详细的安装说明，总结如下：</p>
<ol>
<li>将以下命令粘贴至终端</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&#x2F;usr&#x2F;bin&#x2F;ruby -e &quot;$(curl -fsSL https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;Homebrew&#x2F;install&#x2F;master&#x2F;install)&quot;</span><br></pre></td></tr></table></figure>
<ol start="2">
<li>输入以下命令进行安装 jenv</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ brew install jenv</span><br></pre></td></tr></table></figure>
<ol start="3">
<li>安装成功后进行配置</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ echo &#39;export PATH&#x3D;&quot;$HOME&#x2F;.jenv&#x2F;bin:$PATH&quot;&#39; &gt;&gt; ~&#x2F;.bash_profile</span><br><span class="line"></span><br><span class="line">$ echo &#39;eval &quot;$(jenv init -)&quot;&#39; &gt;&gt; ~&#x2F;.bash_profile</span><br></pre></td></tr></table></figure>
<ol start="4">
<li>输入以下命令查看找到的java版本</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"> $ jenv versions</span><br><span class="line"></span><br><span class="line">* system (set by &#x2F;Users&#x2F;wangxiaohuan&#x2F;.jenv&#x2F;version)</span><br></pre></td></tr></table></figure>
<ol start="5">
<li>
<p>下载安装JDK</p>
<p><a href="https://www.oracle.com/java/technologies/downloads/#java8-mac" target="_blank" rel="noopener">JDK8</a>，<a href="https://www.oracle.com/java/technologies/downloads/#java11-mac" target="_blank" rel="noopener">JDK11</a>，<a href="https://www.oracle.com/java/technologies/downloads/#jdk17-mac" target="_blank" rel="noopener">JDK17</a></p>
<p>注：<em>下载下的JDK都存放在 /Library/Java/JavaVirtualMachines/ 目录下</em></p>
</li>
<li>
<p>使用 jenv add 命令将JDK 加入jenv中</p>
</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line">#添加JDK8</span><br><span class="line">$ jenv add &#x2F;Library&#x2F;Java&#x2F;JavaVirtualMachines&#x2F;jdk1.8.0_151.jdk&#x2F;Contents&#x2F;Home</span><br><span class="line"></span><br><span class="line">oracle64-1.8.0.151 added</span><br><span class="line">1.8.0.151 added</span><br><span class="line">1.8 added</span><br><span class="line"></span><br><span class="line">#添加JDK11</span><br><span class="line">$ jenv add &#x2F;Library&#x2F;Java&#x2F;JavaVirtualMachines&#x2F;jdk-11.0.10.jdk&#x2F;Contents&#x2F;Home</span><br><span class="line"></span><br><span class="line">oracle64-11.0.10 added</span><br><span class="line">11.0.10 added</span><br><span class="line">11.0 added</span><br><span class="line">11 added</span><br><span class="line"></span><br><span class="line">#添加JDK17</span><br><span class="line">$ jenv add &#x2F;Library&#x2F;Java&#x2F;JavaVirtualMachines&#x2F;jdk-17.0.2.jdk&#x2F;Contents&#x2F;Home</span><br><span class="line"></span><br><span class="line">oracle64-17.0.2 added</span><br><span class="line">17.0.2 added</span><br><span class="line">17.0 added</span><br><span class="line">17 added</span><br></pre></td></tr></table></figure>
<ol start="7">
<li>运行jenv versions 命令</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">$ jenv versions</span><br><span class="line"></span><br><span class="line">* system (set by &#x2F;Users&#x2F;wangxiaohuan&#x2F;.jenv&#x2F;version)</span><br><span class="line">  1.8</span><br><span class="line">  1.8.0.151</span><br><span class="line">  11</span><br><span class="line">  11.0</span><br><span class="line">  11.0.10</span><br><span class="line">  17</span><br><span class="line">  17.0</span><br><span class="line">  17.0.2</span><br><span class="line">  oracle64-1.8.0.151</span><br><span class="line">  oracle64-11.0.10</span><br><span class="line">  oracle64-17.0.2</span><br></pre></td></tr></table></figure>
<ol start="8">
<li>选择一个JDK 版本，运行（ jenv local /jenv global）命令 注 jenv local 当前目录使用 JDK  jenv global 全局 JDK</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">$ jenv local 1.8</span><br><span class="line">jenv local 1.8</span><br><span class="line"></span><br><span class="line">#查看JDK 版本</span><br><span class="line">$ java -version</span><br><span class="line">java version &quot;1.8.0_151&quot;</span><br><span class="line">Java(TM) SE Runtime Environment (build 1.8.0_151-b12)</span><br><span class="line">Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)</span><br></pre></td></tr></table></figure>

                

                <hr>
                <!-- Pager -->
                <ul class="pager">
                    
                        <li class="previous">
                            <a href="/技术/2019-01-30/" data-toggle="tooltip" data-placement="top" title="提问的智慧">&larr; Previous Post</a>
                        </li>
                    
                    
                        <li class="next">
                            <a href="/插件/2019-01-11/" data-toggle="tooltip" data-placement="top" title="Eclipse+JRebel+Tomcat热部署">Next Post &rarr;</a>
                        </li>
                    
                </ul>

                <br>

                <!--打赏-->
                
                <!--打赏-->

                <br>
                <!--分享-->
                
                    <div class="social-share"  data-wechat-qrcode-helper="" align="center"></div>
                    <!--  css & js -->
                    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/css/share.min.css">
                    <script src="https://cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/js/social-share.min.js"></script>
                
                <!--分享-->
                <br>                       
                
                <!-- require APlayer -->
                

                <!-- duoshuo Share start -->
                
                <!-- 多说 Share end-->

                <!-- 多说评论框 start -->
                
                <!-- 多说评论框 end -->

                <!-- disqus comment start -->
                
                    <div class="comment">
                        <div id="disqus_thread" class="disqus-thread"></div>
                    </div>
                
                <!-- disqus comment end -->

                

            </div>
            
            <!-- Tabe of Content -->
            <!-- Table of Contents -->

  
    <style>
      span.toc-nav-number{
        display: none
      }
    </style>
  
    
      <aside id="sidebar">
        <div id="toc" class="toc-article">
        <strong class="toc-title">Contents</strong>
        
          <ol class="toc-nav"><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#jdk-介绍"><span class="toc-nav-number">1.</span> <span class="toc-nav-text">JDK 介绍</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#jdk选择"><span class="toc-nav-number">2.</span> <span class="toc-nav-text">JDK选择</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#openjdk"><span class="toc-nav-number">3.</span> <span class="toc-nav-text">OpenJDK</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#jdk-版本选择"><span class="toc-nav-number">4.</span> <span class="toc-nav-text">JDK 版本选择</span></a><ol class="toc-nav-child"><li class="toc-nav-item toc-nav-level-4"><a class="toc-nav-link" href="#这就需要使用-mac-上的-java-版本管理工具-jevn"><span class="toc-nav-number">4.1.</span> <span class="toc-nav-text">这就需要使用 MAC 上的 JAVA 版本管理工具 jevn</span></a></li></ol></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#jenv"><span class="toc-nav-number">5.</span> <span class="toc-nav-text">Jenv</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#安装-jenv"><span class="toc-nav-number">6.</span> <span class="toc-nav-text">安装 Jenv</span></a></li></ol>
        
        </div>
      </aside>
    

                
            <!-- Sidebar Container -->
            <div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                sidebar-container">

                <!-- Featured Tags -->
                
                <section>
                    <!-- no hr -->
                    <h5><a href="/tags/">FEATURED TAGS</a></h5>
                    <div class="tags">
                       
                          <a class="tag" href="/tags/#工具" title="工具">工具</a>
                        
                    </div>
                </section>
                

                <!-- Friends Blog -->
                
            </div>
        </div>
    </div>
</article>




<!-- disqus embedded js code start (one page only need to embed once) -->
<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES * * */
    var disqus_shortname = "your-disqus-ID";
    var disqus_identifier = "http://www.wangxiaohuan.com/jenv/2019-01-14/";
    var disqus_url = "http://www.wangxiaohuan.com/jenv/2019-01-14/";

    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
</script>
<!-- disqus embedded js code start end -->





<!-- async load function -->
<script>
    function async(u, c) {
      var d = document, t = 'script',
          o = d.createElement(t),
          s = d.getElementsByTagName(t)[0];
      o.src = u;
      if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
      s.parentNode.insertBefore(o, s);
    }
</script>
<!-- anchor-js, Doc:http://bryanbraun.github.io/anchorjs/ -->
<script>
    async("https://cdn.bootcss.com/anchor-js/1.1.1/anchor.min.js",function(){
        anchors.options = {
          visible: 'hover',
          placement: 'left',
          icon: 'ℬ'
        };
        anchors.add().remove('.intro-header h1').remove('.subheading').remove('.sidebar-container h5');
    })
</script>
<style>
    /* place left on bigger screen */
    @media all and (min-width: 800px) {
        .anchorjs-link{
            position: absolute;
            left: -0.75em;
            font-size: 1.1em;
            margin-top : -0.1em;
        }
    }
</style>



    <!-- Footer -->
    <!-- Footer -->
<footer>
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <ul class="list-inline text-center">
                
                
                    <li>
                        <a target="_blank" href="https://twitter.com/work_wxh">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
                
                

                
                    <li>
                        <a target="_blank" href="http://weibo.com/2742646782">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-weibo fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
                

                
                    <li>
                        <a target="_blank" href="https://www.facebook.com/wxh.work">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
                

                
                    <li>
                        <a target="_blank"  href="https://github.com/xiaohuanwang">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-github fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
                

                

                </ul>
                <p class="copyright text-muted">
                    Copyright &copy; 吃素的左撇子 2022 
                    <br>
                    Theme by <a href="http://beantech.org" target="_blank" rel="noopener">BeanTech</a> 
                    <span style="display: inline-block; margin: 0 5px;">
                        <i class="fa fa-heart"></i>
                    </span> 
                    re-Ported by <a href="http://www.wangxiaohuan.com">吃素的左撇子</a> | 
                    <iframe
                        style="margin-left: 2px; margin-bottom:-5px;"
                        frameborder="0" scrolling="0" width="91px" height="20px"
                        src="https://ghbtns.com/github-btn.html?user=xiaohuanwang&repo=hexo-theme-xiaohuanwang&type=star&count=true" >
                    </iframe>
                </p>
            </div>
        </div>
    </div>
</footer>

<!-- jQuery -->

<script src="/js/jquery.min.js"></script>


<!-- Bootstrap Core JavaScript -->

<script src="/js/bootstrap.min.js"></script>


<!-- Custom Theme JavaScript -->

<script src="/js/hux-blog.min.js"></script>



<!-- async load function -->
<script>
    function async(u, c) {
      var d = document, t = 'script',
          o = d.createElement(t),
          s = d.getElementsByTagName(t)[0];
      o.src = u;
      if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
      s.parentNode.insertBefore(o, s);
    }
</script>

<!-- 
     Because of the native support for backtick-style fenced code blocks 
     right within the Markdown is landed in Github Pages, 
     From V1.6, There is no need for Highlight.js, 
     so Huxblog drops it officially.

     - https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0  
     - https://help.github.com/articles/creating-and-highlighting-code-blocks/    
-->
<!--
    <script>
        async("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function(){
            hljs.initHighlightingOnLoad();
        })
    </script>
    <link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet">
-->


<!-- jquery.tagcloud.js -->
<script>
    // only load tagcloud.js in tag.html
    if($('#tag_cloud').length !== 0){
        async("http://www.wangxiaohuan.com/js/jquery.tagcloud.js",function(){
            $.fn.tagcloud.defaults = {
                //size: {start: 1, end: 1, unit: 'em'},
                color: {start: '#bbbbee', end: '#0085a1'},
            };
            $('#tag_cloud a').tagcloud();
        })
    }
</script>

<!--fastClick.js -->
<script>
    async("https://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js", function(){
        var $nav = document.querySelector("nav");
        if($nav) FastClick.attach($nav);
    })
</script>


<!-- Google Analytics -->


<script>
    // dynamic User by Hux
    var _gaId = 'UA-XXXXXXXX-X';
    var _gaDomain = 'yoursite';

    // Originial
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', _gaId, _gaDomain);
    ga('send', 'pageview');
</script>




<!-- Baidu Tongji -->

<script>
    // dynamic User by Hux
    var _baId = 'xxx';

    // Originial
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?" + _baId;
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
</script>






	<a id="rocket" href="#top" class=""></a>
	<script type="text/javascript" src="/js/totop.js?v=1.0.0" async=""></script>
    <script type="text/javascript" src="/js/toc.js?v=1.0.0" async=""></script>
<!-- Image to hack wechat -->
<img src="http://www.wangxiaohuan.com/img/icon_wechat.png" width="0" height="0" />
<!-- Migrate from head to bottom, no longer block render and still work -->

</body>

</html>
